package com.lxm.action;

import com.lxm.entity.ReturnMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author ：Administrator
 * @date :创建时间 2021/12/28 13:06
 */
public class ActionBase {

    private static final Integer success =1;
    private static final Integer error   =0;

    public static ReturnMessage error(String msg)  {
        return new ReturnMessage(error,msg,null);
    }

    public static ReturnMessage error(String msg,Object obj)  {
        return new ReturnMessage(error,msg,obj);
    }

    public static ReturnMessage success(Object obj)  {
        return new ReturnMessage(success,null,obj);
    }

    public static ReturnMessage success(Object obj,String msg)  {
        return new ReturnMessage(success,msg,obj);
    }
    public static ReturnMessage success()  {
        return new ReturnMessage(success,null,null);
    }
    public static ReturnMessage success(String msg)  {
        return new ReturnMessage(success,msg,null);
    }

}
